﻿@{
    ViewBag.Title = "BookMessage";
}
<style type="text/css">
    .aa {
        background-color: #808080;
        height: 50px;
        line-height: 50px;
        text-align: center;
    }

    .aaa {
        background-color:#0ff;
        height: 50px;
        line-height: 50px;
        text-align: center;
    }

    th {
        width: 140px;
    }

    td {
        text-align: center;
    }
</style>
<form action="../Books/BookMessage" method="post">
    <table border="1" cellspacing="0">
        <tr>
            <th colspan="9">
                <h2 class="aa">图书信息列表</h2>
            </th>
        </tr>
        <tr>
            <th colspan="9" class="aaa">
                <input type="text" name="BookName" placeholder="请输入书名！"/><input type="submit" value="搜索"/>
            </th>
        </tr>
        <tr>
            <th>图书编号</th>
            <th>图书名称</th>
            <th>图书作者</th>
            <th>类别编号</th>
            <th>图书价格</th>
            <th>出版日期</th>
            <th>修改信息</th>
@*            <th>库存管理</th>*@
            <th>状态</th>
        </tr>
        @foreach (var item in ViewBag.tt)
        {
            <tr>
                <td>@item.BookId</td>
                <td>@item.BookName</td>
                <td>@item.BookAuthor </td>
                <td>@item.TypeID</td>
                <td>@item.BookPrice</td>
                <td>@item.BookTime</td>
                <td><a href="../Books/UpdataBook?BookId=@item.BookId">修改</a></td>
                <td><a href="#">@(item.BookState == 1 ? "上架" : "下架")</a></td>
            </tr>
        }
        <tr>
            <td><a href="../Books/AddBook">新增</a></td>
            <td><a href="../Books/BookMessage">全部</a></td>
            <td><a href="/Books/selectBook">已上架</a></td>
            <td><a href="/Books/selectBooks">已下架</a></td>
        </tr>
    </table>
</form>
